<template>
	<view>
		<view class="orderInfo">
			<u-cell-group>
				<u-cell  title="退款金额" :value="orderInfo.amount"></u-cell>
				<view class="rule">
					（退款金额 = 实际支付金额－已使用优惠金额）
				</view>
				<u-cell  title="订单号" :value="orderInfo.orderno"></u-cell>
				<u-cell  title="退款状态" v-if="orderInfo.status == 3" value="已驳回"></u-cell>
				<u-cell  title="退款状态" v-if="orderInfo.status == 2" value="已同意"></u-cell>
				<u-cell  title="退款状态" v-if="orderInfo.status == 4" value="已退款"></u-cell>
			</u-cell-group>
			<view class="remark" v-if="orderInfo.status == 3">
				驳回理由：
				<view class="remark-content">
					{{orderInfo.mark}}
				</view>
			</view>
			<view class="remark">
				申请理由：
				<view class="remark-content">
					{{orderInfo.remark}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import api from "@/api/order.js"
	export default {
		data() {
			return {
				value1:'',
				orderInfo:[]
			}
		},
		onLoad(options) {
			// console.log(options.orderno);
			this.getMemberRefundDetail(options.orderno);
		},
		methods: {
			getMemberRefundDetail(orderno) {
				api.getCouRefundDetail({
					orderno:orderno
				}).then(res => {
					if (res.code == 1) {
						this.orderInfo = res.data
						// console.log(this.orderInfo);
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.textarea{
		width: 90%;
		margin: 20rpx auto;
		.textarea-title{
			margin-bottom: 15rpx;
		}
	}
	.button{
		width: 90%;
		margin: 20rpx auto;
	}
	.remark{
		width: 90%;
		margin: 20rpx auto;
		font-size: 30rpx;
		font-weight: bold;
		.remark-content{
			font-size: 28rpx;
			font-weight: 400;
			color: #666666;
			margin-top:20rpx;
		}
	}
	.rule{
		position: absolute;
		top:70rpx;
		left: 15rpx;
		font-size: 22rpx;
		color: #F12F63;
	}
</style>
